<include file="Base/header" />
<div class="page-container">
	<include file="Base/menu" />
	<div class="page-content">
		<div class="container-fluid">
			<div class="row-fluid">
					<div class="span12">
						<!-- BEGIN PAGE TITLE & BREADCRUMB-->
						<h3 class="page-title">
						</h3>
						<ul class="breadcrumb">
							<li>
								<i class="icon-home"></i>
								<a href="/index.php/Admin/Index/index">首页</a>
								<i class="icon-angle-right"></i>
							</li>
                            <li><a href="/index.php/Admin/User/user_list">会员管理</a><i class="icon-angle-right"></i></li>
							<li><a href="">{$username}  推荐的人</a></li>
						</ul>
						<!-- END PAGE TITLE & BREADCRUMB-->
					</div>
			</div>
			<div class="row-fluid">
					<div class="span12">
						<!-- BEGIN EXAMPLE TABLE PORTLET-->
						<div class="portlet box blue">
							<div class="portlet-title">
								<div class="caption"><i class="icon-globe"></i>{$username}  推荐的人</div>
								<div class="tools">
									<a href="javascript:;" class="collapse"></a>
									<a href="javascript:;" class="reload"></a>
									<a href="javascript:;" class="remove"></a>
								</div>
							</div>
							<div class="portlet-body">
								<div class="clearfix">
									
								</div>
								<div id="sample_1_wrapper" class="dataTables_wrapper form-inline" role="grid">
									<div class="row-fluid">
                                        <form method="get" action="__URL__/user_list" >
										<div class="span4">
											<div id="sample_1_length" class="dataTables_length">
												<select size="1" id="mySelect" name="page_size" aria-controls="sample_1" class="m-wrap small" onchange="submit(this.value)">
                                                    <option id="page10" value="10">10</option>
                                                    <option id="page20" value="20">20</option>
                                                    <option id="page50" value="50">50</option>
                                                    <option id="page100" value="100">100</option>
                                                </select> 条/每页</label>
											</div>
										</div>
										<div class="span4">
                                            <div class="dataTables_filter" id="sample_1_filter">
                                                <label>会员名称: <input placeholder="输入要搜索的会员名称" name="user_name" type="text" aria-controls="sample_1" class="m-wrap medium"></label>
                                            </div>
										</div>
                                        <div class="span4">
                                            <div class="dataTables_filter" id="sample_1_filter">
                                                <input type="submit" aria-controls="sample_1" class="btn blue" value="搜索">
                                            </div>
                                        </div>
                                        </form>
									</div>
<table class="table table-striped table-bordered table-hover dataTable"
id="sample_1" aria-describedby="sample_1_info">
    <thead>
        <tr role="row">
           
            <th class="sorting" role="columnheader" tabindex="0" aria-controls="sample_1"
            rowspan="1" colspan="1" aria-label="" style="width: 50px;">
                ID
            </th>
            <th class="hidden-480 sorting_disabled" role="columnheader" rowspan="1"
            colspan="1" aria-label="Email" style="width: 50px;">
                用户名
            </th>
            <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_1"
            rowspan="1" colspan="1" aria-label="" style="width: 40px;">
                性别
            </th>
            <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_1"
            rowspan="1" colspan="1" aria-label="" style="width: 40px;">
                年龄
            </th>
            <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_1"
            rowspan="1" colspan="1" aria-label="" style="width: 40px;">
                是否认证
            </th>
            <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_1"
            rowspan="1" colspan="1" aria-label="" style="width: 40px;">
                余额
            </th>
            <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample_1"
            rowspan="1" colspan="1" aria-label="" style="width: 40px;">
                上次登录时间
            </th>
            <th class="hidden-480 sorting_disabled" role="columnheader" rowspan="1"
            colspan="1" aria-label="Joined" style="width: 20px;">
                管理
             </th>

        </tr>
    </thead>

    <foreach name="data" item="vo">

    <tbody role="alert" aria-live="polite" aria-relevant="all">
     <tr class="gradeX odd">
            
            <td class=" ">
                {$vo.id}
            </td>
            <td class="hidden-480 ">
                <a href="__CONTROLLER__/updata?id={$vo.id}">
                   {$vo.username}
                </a>
            </td>
            <td class="hidden-480 ">
                {$vo.sex}
            </td>
            <td class="hidden-480 ">
                {$vo.age}
            </td>
            <td class="hidden-480 ">
                {$vo.is_verify}
            </td>
            <td class="hidden-480 ">
                {$vo.money}
            </td>
            <td class="hidden-480 ">
                 {$vo.login_time|date="Y-m-d",###}
            </td>
            <td class="center hidden-480 ">
                <a href="__CONTROLLER__/updata?id={$vo.id}">
                   详情
                </a>
            </td>
        </tr>
    </tbody>


    </foreach>
</table>
<div class="row-fluid">

    <div class="span6">
        <div class="dataTables_info" id="sample_1_info">
          <if condition="$count eq 0">该用户暂时还没有推荐过新用户</if>
        </div>
    </div>
    <div class="span6">
        <div class="dataTables_paginate paging_bootstrap pagination">
           
        </div>
    </div>
</div>
								</div>
							</div>
						</div>
						<!-- END EXAMPLE TABLE PORTLET-->
					</div>
				</div>
		</div>
	</div>
</div>
<include file="Base/footer" />
<script src="__PUBLIC__/plugins/layer/layer.min.js"></script>
<script type="text/javascript">

function del(id){
    layer.alert('确定删除？',function(close){
        pullRequest(id);
        layer.close(close);
    })
    function pullRequest(id){
        $.ajax({
            type:'POST',
            dataType: "json",
            url: "{:U('Admin/User/Delete')}",
            data: {"id":id},
            success:  function(result){
                if(result.status==1){
                    layer.alert(result.info,function(){self.location="__MODULE__/User/User_list";});
                }else if(result.status==0){
                    //失败
                    layer.alert(result.info);
                }
            }
        });
    }
} 
</script>
<script language="javascript" type="text/javascript">
function submit(){
    $.ajax({
        type:"get",
        url:"index?page_size",
        async:false,
    })
}
element=document.getElementById('page'+{$Think.session.page_size});
element.setAttribute("selected","selected");
</script>
